import wordcloud
txt = "life is short,you need python"
# background_color背景颜色
w = wordcloud.WordCloud(width=1000,height=700, background_color="black")
w.generate(txt)
w.to_file("andy.png")